home *** CD-ROM | disk | FTP | other *** search
/ BMUG Revelations / BMUG Revelations.toast / Programming / Programming Languages / Harvest C / MPW Int & Lib / Interfaces / QDOffscreen.h < prev    next >
Text File  |  1991-04-17  |  4KB  |  132 lines

  1. /************************************************************
  2.  
  3. Created: Sunday, January 6, 1991 at 9:42 PM
  4.     QDOffscreen.h
  5.     C Interface to the Macintosh Libraries
  6.  
  7.  
  8.         Copyright Apple Computer, Inc.    1985-1990
  9.         All rights reserved
  10.  
  11. ************************************************************/
  12.  
  13.  
  14. #ifndef __QDOFFSCREEN__
  15. #define __QDOFFSCREEN__
  16.  
  17. #ifndef __QUICKDRAW__
  18. #include <Quickdraw.h>
  19. #endif
  20.  
  21.  
  22. enum {
  23.  
  24.  
  25. /* New error codes */
  26.     cDepthErr = -157    /*invalid pixel depth*/
  27. };
  28.  
  29. enum {
  30.     pixPurgeBit = 0,
  31.     noNewDeviceBit = 1,
  32.     useTempMemBit = 2,
  33.     keepLocalBit = 3,
  34.     pixelsPurgeableBit = 6,
  35.     pixelsLockedBit = 7,
  36.     mapPixBit = 16,
  37.     newDepthBit = 17,
  38.     alignPixBit = 18,
  39.     newRowBytesBit = 19,
  40.     reallocPixBit = 20,
  41.     clipPixBit = 28,
  42.     stretchPixBit = 29,
  43.     ditherPixBit = 30,
  44.     gwFlagErrBit = 31
  45.     };
  46.  
  47. enum {
  48.     pixPurge = 1 << pixPurgeBit,
  49.     noNewDevice = 1 << noNewDeviceBit,
  50.     useTempMem = 1 << useTempMemBit,
  51.     keepLocal = 1 << keepLocalBit,
  52.     pixelsPurgeable = 1 << pixelsPurgeableBit,
  53.     pixelsLocked = 1 << pixelsLockedBit,
  54.     mapPix = 1 << mapPixBit,
  55.     newDepth = 1 << newDepthBit,
  56.     alignPix = 1 << alignPixBit,
  57.     newRowBytes = 1 << newRowBytesBit,
  58.     reallocPix = 1 << reallocPixBit,
  59.     clipPix = 1 << clipPixBit,
  60.     stretchPix = 1 << stretchPixBit,
  61.     ditherPix = 1 << ditherPixBit,
  62.     gwFlagErr = 1 << gwFlagErrBit
  63.     };
  64.  
  65. typedef unsigned long GWorldFlags;
  66.  
  67. /* Type definition of a GWorldPtr */
  68.  
  69. typedef CGrafPtr GWorldPtr;
  70.  
  71.  
  72. #ifdef __cplusplus
  73. extern "C" {
  74. #endif
  75. pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld,short PixelDepth,const Rect *boundsRect,
  76.     CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  77.     = {0x203C,0x0016,0x0000,0xAB1D}; 
  78. pascal Boolean LockPixels(PixMapHandle pm)
  79.     = {0x203C,0x0004,0x0001,0xAB1D}; 
  80. pascal void UnlockPixels(PixMapHandle pm)
  81.     = {0x203C,0x0004,0x0002,0xAB1D}; 
  82. pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld,short pixelDepth,
  83.     const Rect *boundsRect,CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  84.     = {0x203C,0x0016,0x0003,0xAB1D}; 
  85. pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  86.     = {0x203C,0x0004,0x0004,0xAB1D}; 
  87. pascal void GetGWorld(CGrafPtr *port,GDHandle *gdh)
  88.     = {0x203C,0x0008,0x0005,0xAB1D}; 
  89. pascal void SetGWorld(CGrafPtr port,GDHandle gdh)
  90.     = {0x203C,0x0008,0x0006,0xAB1D}; 
  91. pascal void CTabChanged(CTabHandle ctab)
  92.     = {0x203C,0x0004,0x0007,0xAB1D}; 
  93. pascal void PixPatChanged(PixPatHandle ppat)
  94.     = {0x203C,0x0004,0x0008,0xAB1D}; 
  95. pascal void PortChanged(GrafPtr port)
  96.     = {0x203C,0x0004,0x0009,0xAB1D}; 
  97. pascal void GDeviceChanged(GDHandle gdh)
  98.     = {0x203C,0x0004,0x000A,0xAB1D}; 
  99. pascal void AllowPurgePixels(PixMapHandle pm)
  100.     = {0x203C,0x0004,0x000B,0xAB1D}; 
  101. pascal void NoPurgePixels(PixMapHandle pm)
  102.     = {0x203C,0x0004,0x000C,0xAB1D}; 
  103. pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  104.     = {0x203C,0x0004,0x000D,0xAB1D}; 
  105. pascal void SetPixelsState(PixMapHandle pm,GWorldFlags state)
  106.     = {0x203C,0x0008,0x000E,0xAB1D}; 
  107. pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  108.     = {0x203C,0x0004,0x000F,0xAB1D}; 
  109. pascal QDErr NewScreenBuffer(const Rect *globalRect,Boolean purgeable,GDHandle *gdh,
  110.     PixMapHandle *offscreenPixMap)
  111.     = {0x203C,0x000E,0x0010,0xAB1D}; 
  112. pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  113.     = {0x203C,0x0004,0x0011,0xAB1D}; 
  114. pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  115.     = {0x203C,0x0004,0x0012,0xAB1D}; 
  116. pascal Boolean QDDone(GrafPtr port)
  117.     = {0x203C,0x0004,0x0013,0xAB1D}; 
  118. pascal long OffscreenVersion(void)
  119.     = {0x7014,0xAB1D}; 
  120. pascal QDErr NewTempScreenBuffer(const Rect *globalRect,Boolean purgeable,
  121.     GDHandle *gdh,PixMapHandle *offscreenPixMap)
  122.     = {0x203C,0x000E,0x0015,0xAB1D}; 
  123. pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
  124.     = {0x203C,0x0004,0x0016,0xAB1D}; 
  125. pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  126.     = {0x203C,0x0004,0x0017,0xAB1D}; 
  127. #ifdef __cplusplus
  128. }
  129. #endif
  130.  
  131. #endif
  132.